#include "UsingNode.h"
#include "ScriptCompiler/Token/Token.h"
#include "Output/Console.h"

void CUsingNode::DebugPrint(int32_t InDepth)
{
    //print depth
    for(int32_t i = 0; i < InDepth; ++i)
    {
        WH::Print(U"\t");
    }

    //print using
    WH::Print(U"using ");

    //print name chain
    for(int i = 0; i < NameChain.Num(); ++i)
    {
        WH::Print(NameChain[i]->ToString());

        if(i != NameChain.Num() - 1)
        {
            WH::Print(U".");
        }
    }
    WH::Print(U";\n");
}

std::shared_ptr<CScriptToken> CUsingNode::GetFirstToken()
{
    return Using;
}
